-- GENERATED SPELL FOR [Goretalon Matriarch] --


function spell0_29044(pUnit, Event) --@Evasive Maneuver,Self--
pUnit:FullCastSpellOnTarget(51946,pUnit)
pUnit:RegisterEvent('Sorts_29044', 4317, 1)
end

function spell1_29044(pUnit, Event) --@Eye Peck,n/a--
pUnit:FullCastSpellOnTarget(49865,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29044', 5309, 1)
end

function spell2_29044(pUnit, Event) --@Swoop,n/a--
pUnit:FullCastSpellOnTarget(55079,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29044', 559, 1)
end

function Sorts_29044(pUnit, Event)
local choix_sorts_29044 = math.random(0, 2)
if choix_sorts_29044 == 0 then
pUnit:RegisterEvent('spell0_29044', 1, 1)
end
if choix_sorts_29044 == 1 then
pUnit:RegisterEvent('spell1_29044', 1, 1)
end
if choix_sorts_29044 == 2 then
pUnit:RegisterEvent('spell2_29044', 1, 1)
end
end

function mob29044_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29044', math.random(1500, 3000), 1)
end

function mob29044_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29044_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29044_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29044, 1, 'mob29044_Action')
RegisterUnitEvent(29044, 2, 'mob29044_Leave')
RegisterUnitEvent(29044, 3, 'mob29044_Kill')
RegisterUnitEvent(29044, 4, 'mob29044_Die')
